import {createRouter, createWebHistory} from "vue-router";


import Home from '@/views/Home/index.vue'

import tongyongOCR from '@/views/BdClientView/OCR/tongyongOCR.vue'
import medicalReportOcr from '@/views/BdClientView/OCR/medicalReportOCR.vue'
import healthReportOcr from '@/views/BdClientView/OCR/healthReportOCR.vue'
import imageIdentify from '@/views/BdClientView/ImageIdentify/ImageIdentify.vue'
import imageUnderstand from '@/views/BdClientView/ImageIdentify/ImageUnderstand.vue'
import imgSelfieAnime from '@/views/BdClientView/ImageEnhanced/selfieAnime.vue'
import imgStyleTrans from '@/views/BdClientView/ImageEnhanced/styleTrans.vue'
import imgQualityEnhance from '@/views/BdClientView/ImageEnhanced/imageQualityEnhance.vue'
import imgDefinitionEnhance from '@/views/BdClientView/ImageEnhanced/definitionEnhance.vue'
import imgColourize from '@/views/BdClientView/ImageEnhanced/colourize.vue'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            component: () => import('@/Layout/BasicLayout.vue'),
            children: [
                {
                    path: '/',
                    component: Home,
                    meta: {keepAlive: true},
                    children: [
                        {
                            path: '/',
                            component: tongyongOCR,
                            meta: {keepAlive: true}     //配置页面缓存，不然每次跳转加载之后之前的数据就不见了

                        },
                        {
                            path: '/image/medicalReportOcr',
                            component: medicalReportOcr,
                            meta: {keepAlive: true}

                        },
                        {
                            path: '/image/healthReportOcr',
                            component: healthReportOcr,
                            meta: {keepAlive: true}
                        },
                        {
                            path: '/image/imageIdentify',
                            component: imageIdentify,
                            meta: {keepAlive: true}
                        },
                        {
                            path: '/image/imageUnderstand',
                            component: imageUnderstand,
                            meta: {keepAlive: true}
                        },
                        {
                            path: '/image/imgSelfieAnime',
                            component: imgSelfieAnime,
                            meta: {keepAlive: true}
                        },
                        {
                            path: '/image/imgStyleTrans',
                            component: imgStyleTrans,
                            meta: {keepAlive: true}
                        },
                        {
                            path: '/image/imgQualityEnhance',
                            component: imgQualityEnhance,
                            meta: {keepAlive: true}
                        },
                        {
                            path: '/image/imgDefinitionEnhance',
                            component: imgDefinitionEnhance,
                            meta: {keepAlive: true}
                        },
                        {
                            path: '/image/imgColourize',
                            component: imgColourize,
                            meta: {keepAlive: true}
                        },

                    ]
                },
                {
                    name: '用户中心',
                    path: '/userCenter',
                    component: () => import('@/pages/userCenter.vue'),
                },
                {
                    name: '用户消息',
                    path: '/userMessage',
                    component: () => import('@/pages/userMessage.vue')
                },
                {
                    name: '修改个人信息',
                    path:'/editInfo',
                    component: () => import('@/pages/editInfo.vue')
                }


            ]

        },
        {
            path: '/login',
            component: () => import('@/pages/loginPage.vue'),
        },


    ]
})

export default router;